// src\pages\Detail1.jsx
import React from 'react'
import { useSearchParams } from 'react-router-dom'

export default function Detail1() {
    const [search, setSeach] = useSearchParams();
    const id = search.get('id');
    const title = search.get('title');
    const content = search.get('content');

    return (
        <div>Detail1函数组件
            <button onClick={()=>setSeach('id=004&title=标题44444&content=内容444444')}>点我更新一下search参数</button>
            <ul>
                <li>id：{id}</li>
                <li>title：{title}</li>
                <li>content:{content}</li>
            </ul>
        </div>

    )
}
